package com.example.myapplication

import android.os.Bundle
import android.util.Log
import androidx.appcompat.app.AppCompatActivity

class MainActivity :AppCompatActivity(){

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        val user = User("first名字")

        val user1 = User("Jane", "Doe")

        val user2 = User("Jane", "Doe")
        val structurallyEqual = user1 == user2 // true
        val referentiallyEqual = user1 === user2//false

        user.setData("可可")

        var array1 = arrayOf(1,2,3)
        var array2 = arrayOfNulls<String>(5)
        array2[1] = "a"
        array2[2] = "b"
        array2[3] = "c"

        array1.forEach { println(it) }
        array2.forEach { println(it) }


    }




}